//
// C++ Interface: function2d
//
// Description: 
//
//
// Author:  <>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef CORELIB_MATHLIBFUNCTION2D_H
#define CORELIB_MATHLIBFUNCTION2D_H
#include "ifunction.h"
#include <vector>
#include <boost/shared_ptr.hpp>
#include "element2d.h"

namespace CoreLib {

    namespace MathLib {
        
        class IElement ;
    
    /**
        @author Bartek Taczala
    */
        class Function3D : public IFunction
        {
        public:
            Function3D(const std::string & eq = "" );
            ~Function3D();
            
            
			Element2D::ValueType eval(const Element2D::ValueType & x ) const ; 
            Element2D::ValueType operator()(const Element2D::ValueType & x ) const ; 
            //std::vector<double>& Rect(const double &xStart, const double &xStop, const double &xStep) const ;
        private:
            virtual const IElement*                 eval(const IElement & x ) const ;
            virtual const IElement*                 operator()(const IElement & x) const ;
            mutable std::auto_ptr<Element2D::ValueType>           mp_ParserVariable ; 
            mutable boost::shared_ptr<Element2D>				  mp_ParserTemporary ; 
        };
    }
}
#endif
